home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tpspool.zip / TPSPOOL.DOC < prev    next >
Text File  |  1988-10-11  |  3KB  |  65 lines

  1. TPSPOOL - Simple Print Spooler written in Turbo Pascal 4.0
  2.  
  3. Released to the Public Domain AS IS!
  4.  
  5. Written on or about 12/5/87
  6.  
  7. VERSION 0.8!!!  You get what you pay for.
  8.  
  9. Uses TurboPower's Turbo Professional 4.0.
  10.  
  11. This program captures printer output and saves it in a file.  The printer
  12. output is captured by trapping the BIOS interrupt 17h and hijacking the
  13. characters.
  14.  
  15. If you do not specify a number on the command line, TPSPOOL will use a large
  16. buffer.  The buffer should be large enough to store the most characters that
  17. will be written at once.  Future versions may not impose these requirements.
  18. In practice, I believe 16K, 32K, or the default of about 64K should work in
  19. most cases.  The next version will use EMS for the big buffers, freeing
  20. valuable main RAM.
  21.  
  22. In keeping with the Turbo Pascal tradition, Hex numbers may be passed on the
  23. command line by preceeding them with a $.
  24.  
  25. The program will display some text, then terminate and stay resident.  To
  26. activate, hit Alt-Tab (Alt key and Tab key at the same time).  This "hot key"
  27. toggles the spooler on and off.  When the spooler is off (the default), hitting
  28. Alt-Tab will beep and turn it on.  When the spooler is already on, typing
  29. Alt-Tab will disable the spooler and dump the buffers to the spool file.
  30.  
  31. All printer output is spooled (stored) in the disk file SPOOL01.TMP.  If a
  32. file by this name exists, it is appended, if not, it is created.  Future
  33. versions will allow other file names.
  34.  
  35. Some examples of command line options:
  36.  
  37. TPSPOOL<cr>
  38.   This would use the default (biggest possible) buffer size.
  39.  
  40. TPSPOOL $4000
  41.   This would use a 16K buffer
  42.  
  43. TPSPOOL $8000
  44.   This would use a 32K buffer
  45.  
  46. TPSPOOL 1024
  47.   This would use a 1K buffer.  This is probably too small unless you can
  48.   guarentee that only Int 17h will be used to send output to the printer.
  49.   See technical notes.
  50.  
  51.  
  52. TECHNICAL NOTES
  53.  
  54.   The most common problem experienced with this program is running
  55. it but forgetting to enable the spooler by pressing Alt-Tab.  This will
  56. cause output to go to a printer if one is attached just like normal.  If a
  57. printer isn't attached, YOU MUST ENABLE THE SPOOLER BEFORE TRYING TO PRINT.
  58.  
  59.   If a single write to the PRN device via a DOS Write Handle or Device call is
  60. larger than the specified buffer size, this program will hang.  This is why
  61. the default is almost a full 64K.  In reality, most programs send small chunks
  62. of 1K or less to the PRN device.  If the program uses Int 17h directly (like
  63. most Word Processors), any buffer size of 1K or more will work safely.  I
  64. recommend 4-16K if memory is tight, or 16-64K if it's not.
  65.